import 'dart:convert';

import 'package:package_info_plus/package_info_plus.dart';

import 'base_handler.dart';

class PackageInfoHandler extends BaseHandler {

  @override
  String name = "packageInfo";

  @override
  void handler(dynamic data, dynamic responseCallback) async {
    PackageInfo packageInfo = await PackageInfo.fromPlatform();
    responseCallback(jsonEncode(packageInfo.data));
  }
}